package com.yulebaby.callsenter.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.yulebaby.callsenter.ui.fragment.NewCustomerFragment;
import com.yulebaby.callsenter.ui.fragment.ReturnVisitCustomerFragment;
import com.yulebaby.callsenter.ui.fragment.ToSeaSoonFragment;

/**
 * Created by zhangbo on 2016/12/11.
 */

public class CustomerFragmentPagerAdapter extends FragmentPagerAdapter {
    private String[] mTabStr = new String[]{"所有客户", "即将投公海", "近期回访"};

    public CustomerFragmentPagerAdapter(FragmentManager fm) {
        super(fm);
    }

    @Override
    public Fragment getItem(int position) {
        switch (position) {
            case 0:
                return NewCustomerFragment.newInstance();
            case 1:
                return ToSeaSoonFragment.newInstance();
            case 2:
                return ReturnVisitCustomerFragment.newInstance();
        }
        return null;
    }

    @Override
    public int getCount() {
        return mTabStr.length;
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return mTabStr[position];
    }
}
